package com.bdqn.Service.MaterialType.impl;

import com.bdqn.Service.MaterialType.MaterialTypeService;
import com.bdqn.entity.MaterialType;
import com.bdqn.mapper.MaterialType.MaterialTypeMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class MaterialTypeServiceImpl implements MaterialTypeService {
    @Resource
    private MaterialTypeMapper materialTypeMapper;
    @Override
    public List<MaterialType> selectMaterialType(String MaterialNumber, String NameOfGoods, Integer page, Integer lim) {
        return materialTypeMapper.selectMaterialType(MaterialNumber,NameOfGoods,page,lim);
    }

    @Override
    public MaterialType selectMaterialTypeById(int id) {
        return materialTypeMapper.selectMaterialTypeById(id);
    }

    @Override
    public int deleteMaterialType(int id) {
        return materialTypeMapper.deleteMaterialType(id);
    }

    @Override
    public int getMaterialTypeCount(String MaterialNumber, String NameOfGoods) {
        return materialTypeMapper.getMaterialTypeCount( MaterialNumber, NameOfGoods);
    }

    @Override
    public int updateMaterialType(MaterialType materialType) {
        return materialTypeMapper.updateMaterialType(materialType);

    }

    @Override
    public int insertMaterialType(MaterialType materialType) {
        return materialTypeMapper.insertMaterialType(materialType);

    }
}
